package com.qfedu.scode.controller;

import com.qfedu.scode.entity.Ossstorage;
import com.qfedu.scode.service.intf.OssstorageService;
import com.qfedu.scode.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: StartCoding
 * @description: 一款真正的后端源码生成器，助力轻松入门Java程序
 * @author: Feri(老邢)
 * @create: 2021-01-06 11:09:45
 */
@RestController
@RequestMapping("api/ossstorage/")
@Api(tags = "实现Ossstorage各种操作")
public class OssstorageController{
    /*
    *注入业务逻辑层对象*/
    @Autowired
    private OssstorageService service;
    /*
    * 新增内容*/
    @ApiOperation(value = "实现新增",notes = "实现新增")
    @PostMapping("save.do")
    public R save(@RequestBody Ossstorage ossstorage){
       return service.save(ossstorage);
    }
    /*
    * 查询 所有数据*/
    @ApiOperation(value = "实现全部查询",notes = "实现全部查询")
    @GetMapping("all.do")
    public R all(){
       return service.queryAll();
    }
}